#!/bin/bash
CURRENT_PATH=$(pwd);
ROOT_PATH=$(cd `dirname $0`/; pwd);

if [[ ! -e "/etc/nginx/cert/game-socket.nuliji.com" ]]
then
    mkdir -p /etc/nginx/cert/game-socket.nuliji.com
fi
cat ${ROOT_PATH}/game-socket.nuliji.com.key > /etc/nginx/cert/game-socket.nuliji.com/server.key
cat ${ROOT_PATH}/game-socket.nuliji.com.pem > /etc/nginx/cert/game-socket.nuliji.com/server.pem

if [[ ! -e "/develop/source/project/.well-known" ]]
then
    mkdir -p /develop/source/project/.well-known
fi
cat ${ROOT_PATH}/apple-app-site-association > /develop/source/project/.well-known/apple-app-site-association

service nginx restart